import request from '@/libs/request'

export const api ={
	/*create_time: new Date().Format("yyyy-MM-dd hh:mm:ss"),*/
	userOauth:function(data) {return request({url: '/api/Index/userOauth',method: 'POST',data});},//编辑文章
	checkUserCode:function(data) {return request({url: '/api/Index/checkUserCode',method: 'POST',data});},//验证工号
	getMember:function(data) {return request({url: '/api/User/getAppUser',method: 'GET',data});},//获取文章列表
	formField:function(data) {return request({url: '/api/User/formField',method: 'GET',data});},//获取文章列表
	updateUser:function(data) {return request({url: '/api/User/updateUser',method: 'GET',data});},//获取文章列表
	formData:{sex:'男'},
	rules:{
		// 对name字段进行必填验证
		user_name: {
			rules: [{required: true,errorMessage: '请输入姓名'},
				{minLength: 1,maxLength: 100,errorMessage: '姓名长度在 {minLength} 到 {maxLength} 个字符'}
			]
		},
		user_code: {
			rules: [
				{required: true,errorMessage: '请输入工号'},
				{minLength: 1,maxLength: 100,errorMessage: '长度在 {minLength} 到 {maxLength} 个字符'}
			]
		},
		
		tel: {
			rules: [{required: true,errorMessage: '请输入手机号'}]
		},
		
		// 对email字段进行必填验证
		email: {
			rules: [{format: 'email',errorMessage: '请输入正确的邮箱地址'}]
		}
	},
	
	sex: [{text: '男',value: '男'}, {text: '女',value: '女'}],
	agree: [{text: '我已阅读并同意用户隐私协议',value: "是"}]

}

